package com.lt.exam.ZhuangShiQi;

import com.lt.exam.Yao.YaoMap;
import com.lt.exam.ZhuangShiQi.ShiXian.GanMaoLing;
import com.lt.exam.ZhuangShiQi.ShiXian.JiBenBingLi;
import com.lt.exam.ZhuangShiQi.ShiXian.XiaoYanYao;

/**
 * @author LT
 * @version 1.0
 * @PackageName com.lt.exam.ZhuangShiQi
 * @ClassName Test
 * @Description to do
 * @date 2021/12/1 16:29
 */
public class Test {
    public static void main(String[] args) {
        BingLi s = new JiBenBingLi();
        System.out.println(s.cost());
        System.out.println(s.getDescription());
        BingLi s1 = new XiaoYanYao(s);
        System.out.println(s1.cost());
        System.out.println(s1.getDescription());
        BingLi s2 = new GanMaoLing(s1);
        System.out.println(s2.cost());
        System.out.println(s2.getDescription());
        System.out.println("---------打印当前药品------------");
        s2.printList();
        s.delete(YaoMap.getYaoMap().get("消炎药"));
        System.out.println("--------删除消炎药-------------");
        s2.printList();
        System.out.println("--------打印价格和描述-------------");
        System.out.println(s2.cost());
        System.out.println(s2.getDescription());

        System.out.println("--------添加消炎药-------------");
        BingLi s3 = new XiaoYanYao(s2);
        System.out.println(s3.cost());
        System.out.println(s3.getDescription());
        System.out.println("---------------------");
        s3.printList();

    }
}
